home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga CD-ROM Collection
/
Amiga CD-ROM Collection - Auge 4000 and Cactus and Demo Util.iso
/
auge4000
/
46
/
lib
/
string
/
strins.c
< prev
next >
Wrap
C/C++ Source or Header
|
1990-06-20
|
335b
|
33 lines
/*
* STRINS.C
*/
void
strins(d, s)
char *d;
const char *s;
{
int len = strlen(s); /* # bytes to insert */
int i;
char *ptr;
/*
* make room
*/
ptr = d + strlen(d);
while (ptr >= d) {
ptr[len] = ptr[0];
--ptr;
}
/*
* insert string
*/
while (*s)
*++ptr = *s++;
}